<c:if test="#{not empty widgetProperty_actions}"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:c="http://java.sun.com/jstl/core"
  class="#{widgetProperty_styleClass}">

<nxu:set var="idPrefix" value="#{widget.id}_"
  cache="true">
<nxu:set var="clickedActionIdHolder" value="#{idPrefix}clickedActionIdHolder"
  cache="true">
<nxu:set var="formAdded" value="#{widgetProperty_addForm}" cache="true">
<nxu:set var="tabsPanelId" value="#{widget.id}_panel" cache="true">
<nxu:set var="tabContentPanelId" value="#{widget.id}_tab_content" cache="true">
<nxu:set var="showTabsBar" value="#{not widgetProperty_hideSingleTab or widgetProperty_actions.size > 1}">
<nxu:set var="tabWidgetView" value="#{widgetProperty_view}">
<nxu:set var="tabWidgetPattern" value="#{widgetProperty_pattern}">
<nxu:valueHolder id="#{clickedActionIdHolder}"
  var="clickedActionId"
  skip="#{!widgetProperty_trackCurrentAction}"
  defaultValue="#{widgetProperty_currentTabAction.id}">
<c:choose>

  <c:when test="#{widgetProperty_overallDisplay == 'vertical_block'}">
    <div class="gridContainer">
      <div class="gridRow">
        <c:if test="#{showTabsBar}">
          <div class="gridBox verticalTabsColumn gridStyle2">
            <a4j:outputPanel id="#{tabsPanelId}" layout="block"
              styleClass="tabsBar vertical #{widgetProperty_styleClass}">
              <ui:include src="/widgets/actions/tabs_widget_bar_template.xhtml" />
            </a4j:outputPanel>
            <div class="clear" />
          </div>
        </c:if>
        <div class="gridBox verticalTabsContent #{showTabsBar?'gridStyle10':'gridStyle12'}">
          <a4j:outputPanel id="#{tabContentPanelId}" layout="block">
            <ui:include src="/widgets/actions/tabs_widget_content_template.xhtml" />
          </a4j:outputPanel>
        </div>
      </div>
    </div>
  </c:when>

  <c:otherwise>
    <c:if test="#{showTabsBar}">
      <a4j:outputPanel id="#{tabsPanelId}" layout="block"
        styleClass="tabsBar #{widgetProperty_styleClass}">
        <ui:include src="/widgets/actions/tabs_widget_bar_template.xhtml" />
      </a4j:outputPanel>
      <div class="clear" />
    </c:if>
    <a4j:outputPanel id="#{tabContentPanelId}" layout="block"
      styleClass="#{nxu:test(showTabsBar, 'tabsContent', '')}">
      <ui:include src="/widgets/actions/tabs_widget_content_template.xhtml" />
    </a4j:outputPanel>
  </c:otherwise>

</c:choose>

</nxu:valueHolder>
</nxu:set>
</nxu:set>
</nxu:set>
</nxu:set>
</nxu:set>
</nxu:set>
</nxu:set>
</nxu:set>

</c:if>